package com.mp3s.stock.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.crypto.SecureUtil;

@Controller
public class user
{
    @RequestMapping("/user/passwd")
    @ResponseBody
    public String passwd() {
        //获取系统环境信息
        // return "version is 1.0.0";
        // String uuid = IdUtil.randomUUID();
        String s2 = IdUtil.simpleUUID();
        String now = DateUtil.now();
        String s3 = SecureUtil.md5(now);
        System.out.println(s2+","+s3);
        String out = StrUtil.sub(s2, 0, 6); //strSub1 -> c
        return out;
    }
}